Electronic compass assemblies are often used in vehicles to indicate to a driver or passenger of the vehicle a direction that the vehicle is facing or traveling. A typical electronic compass assembly includes magnetic sensors that detect a magnetic field of the Earth along a first axis and a second, orthogonal axis. A microprocessor represents the magnetic field detected along the first axis and the second, orthogonal axis as a magnetic field data point having X and Y coordinates and plotted on a reference coordinate system, where a positive Y-axis direction represents magnetic north. A line between the magnetic field data point and the center of the reference coordinate system forms an angle with the positive Y-axis. The microprocessor determines the direction that the vehicle is facing or traveling based upon the angle. The direction is displayed to an occupant of the vehicle as one of North, South, East, West, Northeast, Northwest, Southeast, and Southwest.
The magnetic conditions of the vehicle and surrounding environment of the vehicle typically change over time. As a result, the magnetic sensors are periodically calibrated to correct the magnetic field data for these magnetic changes. Calibration typically includes collecting magnetic field data from the magnetic sensors through a 360° turn of the vehicle (or a predetermined percentage of a 360° turn). The collected magnetic field data is generally in ellipse-shaped pattern. The microprocessor utilizes a statistical fitting procedure to produce a curve that corresponds to the magnetic field data pattern, an elliptical curve for example. The curve is then mathematically adapted to and centered in a reference system. A reference system where the elliptical curve is transformed into a centered circle is typically used. The reference curve provides a reference correction factor for mathematically adapting, or correcting, magnetic field data points. An angle corresponding to a corrected magnetic field data point therefore takes into account the changed magnetic conditions and provides the basis for determining a more accurate vehicle direction.
The microprocessor continually tracks incoming magnetic field data to identify when the vehicle makes another 360° turn. When another 360° turn is identified, the microprocessor uses the data collected during the 360° turn to compute a new reference correction factor. If the new reference correction factor passes a validity check, it replaces the previous reference correction factor and is then used by the microprocessor to correct magnetic field data points for vehicle heading computation.
One typical method for identifying a 360° turn is commonly referred to as bin tracking. Bin tracking includes estimating a tracking angle from a magnetic field data point without first correcting the magnetic field data point for changed surrounding magnetic conditions using the reference correction factor (e.g., an ellipse). The tracking angle may not be useful for determining an accurate vehicle direction, however, it is useful to determine when the vehicle completes a 360° turn.
The microprocessor separates the 360° turn into “bins.” Typically, each bin represents a 12° increment of the 360°. Bin #1 might include the increment 1–12°, bin #2 13–24° and so on up to 360°. The microprocessor catalogues the tracking angles in the bins. When all of the bins (or a selected number of the bins) have a cataloged angle, the microprocessor knows that the vehicle has completed a 360° turn (or selected percentage of the 360° turn).
One typical method of estimating a series of tracking angles without first correcting the magnetic field data points includes plotting an uncorrected magnetic field data point on a reference coordinate system (e.g., a coordinate system of the magnetic sensors). For an initial uncorrected magnetic field data point, an offset point lying on a line between the uncorrected magnetic field data point and the center of the reference coordinate system and at a given distance from the uncorrected magnetic field data point is also plotted. The angle between the line and a north reference line that extends from the offset point parallel to the Y-axis is used as the tracking angle for the uncorrected magnetic field data point.
A subsequent tracking angle is determined the same way by plotting a subsequent uncorrected magnetic field data point on the reference coordinate system. If the magnetic field data point lies within a threshold (the given distance plus or minus a percent of the given distance) of the initial offset point, the initial offset point is still used to compute the tracking angle corresponding to the subsequent uncorrected magnetic field data point. If the subsequent uncorrected magnetic field data point lies outside the threshold of the initial offset point, a second offset point is determined. The second offset point lies on a line between the subsequent uncorrected magnetic field data point and the previous offset point. The angle between the line and a north reference line that extends from the second offset point parallel to the Y-axis is the subsequent tracking angle. Thus, for each new incoming uncorrected magnetic field data point, a new corresponding tracking angle is computed, based on the formerly determined offset point or a new one depending on the fact that the new incoming uncorrected magnetic field data point lies within or without the threshold of the last computed (current) offset point.
Disadvantageously, this typical method allows magnetic field data to be collected that is unsuitable for the statistical fitting procedure. When the vehicle has completed a 360° turn (or selected percentage of the 360° turn), the generally ellipse-shaped pattern of the collected magnetic field data is often unsuitable if the elliptical pattern is too flat (i.e., the ratio of the minor axis to the major axis of the elliptical pattern is relatively small for example). In extreme conditions, the generally ellipse-shaped pattern resembles a line rather than an elliptical shape. As a result, the statistical fitting procedure is unable to accurately or reliably calculate an elliptical curve from the line-shaped magnetic field data pattern, which in turn can result in an erroneous calibration.
Accordingly, there is a need for an electronic compass assembly and method that more reliably tracks vehicle rotation in order to identify suitable magnetic field data when the vehicle rotates a desired amount. This invention addresses those needs and provides enhanced capabilities while avoiding the shortcomings and drawbacks of the prior art.